package org.crazyit.cloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author JLL
 * @Date 2019/2/8/0008 下午 10:32
 */
@RestController
public class TestController {


    @Autowired
    private HelloClient helloClient;

    @GetMapping(value = "/router")
    public String router(){
        String result = helloClient.hello("tom");
        return result;
    }

    @GetMapping(value = "/police")
    public Police getPolice(){
        Police p = helloClient.getPolice(1);
        return p;
    }

    @GetMapping(value = "/myhello")
    public String myhello(){
        String result =  helloClient.myHello();
        return result;
    }




}
